d01gbf

d01gbf © Numerical Algorithms Group, 2002.

Purpose

D01GBF Multi-dimensional quadrature over hyper-rectangle, Monte Carlo method

Synopsis

[acc,wrkstr,finest,mincls,ifail] = d01gbf(a,b,functn,epslon,wrkstr<,mincls,...
maxcls,lenwrk,ifail>)

Description

 
 D01GBF uses an adaptive Monte Carlo method. It is implemented for 
 integrals of the form:
 
              b  b     b                            
               1  2     n                           
              /  /     /                            
              |  | ... | f(x ,x ,...,x )dx ...dx dx .
              /  /     /    1  2      n   n     2  1
              a  a     a                            
               1  2     n                           
 
 Upon entry, unless LENWRK has been set to the minimum value 
 10*NDIM, the routine subdivides the integration region into a 
 number of equal volume subregions. Inside each subregion the 
 integral and the variance are estimated by means of pseudo-random
 sampling. All contributions are added together to produce an 
 estimate for the whole integral and total variance. The variance 
 along each co-ordinate axis is determined and the routine uses 
 this information to increase the density and change the widths of
 the sub-intervals along each axis, so as to reduce the total 
 variance. The total number of subregions is then increased by a 
 factor of two and the program recycles for another iteration. The
 program stops when a desired accuracy has been reached or too 
 many integral evaluations are needed for the next cycle.
 

Parameters

d01gbf

Required Input Arguments:

a (:)                                 real
b (:)                                 real
functn                                function (User-Supplied)
epslon                                real
wrkstr (lenwrk)                       real

Optional Input Arguments:                       <Default>

mincls                                integer  0
maxcls                                integer  30000
lenwrk                                integer  d01gbf09(length(a),maxcls)
ifail                                 integer  -1

Output Arguments:

acc                                   real
wrkstr (lenwrk)                       real
finest                                real
mincls                                integer
ifail                                 integer